import React from 'react'

class App extends React.Component {

    constructor() {
        super()
        this.state = {
            active: true
        }
    }
    render() {
        const { active } = this.state
        // 判断+逻辑运算
        return <div>
            { // 或(前面不成立执行后面)
                active === false || <h1>前面的条件不成立</h1>
            }
            {
                //与(前面不成立,结束执行)
                active === false && <h1>我要现实</h1>
            }
            {
                //非(极大程度上简化表达式)
                !active || <p>非</p>
            }
            {
                //v-show
                <div style={active ? { display:'none'} : {}}>
                    123
              </div>
            }
        </div>
    }
}

export default App